package com.ms.auction.common.module.goods;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 拍品
 * </p>
 *
 * @author MaHC
 * @since 2019-07-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="AuctionGoods对象", description="拍品")
public class AuctionGoods implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "组织者id")
    @TableField("organizer_id")
    private Integer organizerId;

    @ApiModelProperty(value = "拍品名字")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "商品分类（分类中最下一层的id）")
    @TableField("goods_type")
    private Integer goodsType;

    @ApiModelProperty(value = "限时拍卖开始时间")
    @TableField("begin_time")
    private LocalDateTime beginTime;

    @ApiModelProperty(value = "限时拍卖结束时间")
    @TableField("end_time")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "顺延时间")
    @TableField("postpone_time")
    private Integer postponeTime;

    @ApiModelProperty(value = "拍品价格")
    @TableField("goods_price")
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "利润金额")
    @TableField("profit")
    private BigDecimal profit;

    @ApiModelProperty(value = "起拍价格")
    @TableField("starting_price")
    private BigDecimal startingPrice;

    @ApiModelProperty(value = "单次佣金")
    @TableField("single_commission")
    private BigDecimal singleCommission;

    @ApiModelProperty(value = "保证金")
    @TableField("bond")
    private BigDecimal bond;

    @ApiModelProperty(value = "拍品编号")
    @TableField("number")
    private String number;

    @ApiModelProperty(value = "上拍次数")
    @TableField("auction_num")
    private Integer auctionNum;

    @ApiModelProperty(value = "状态1为上拍,0为未上拍,2已拍出")
    @TableField("status")
    @TableLogic
    private Integer status;

    @ApiModelProperty(value = "备注字段")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "乐观锁标志")
    @TableField("version")
    @Version
    private Integer version;

    /**
     * 用于接收参数 1-拍品详情
     */
    @TableField(exist = false)
    private Integer customerId;
}
